
#include <iostream>
#include <list>
#include <algorithm>

void test_case1() {

    std::list<int> li = {1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5};

    for (auto i : li) 
        std::cout << i;
    std::cout << std::endl;    

    auto pos1 = std::lower_bound(li.begin(), li.end(), 2);
    auto pos2 = std::upper_bound(li.begin(), li.end(), 2);

    std::cout << "pos1 " << *pos1 << std::endl;
    std::cout << "pos2 " << *pos2 << std::endl;

    for (; pos1 != pos2; ++pos1) 
        std::cout << *pos1;
    std::cout << std::endl;
}

int main() {

    test_case1();

    return 0;
}